"""
API蓝图注册
"""
from flask import Blueprint, Flask

def register_blueprints(app: Flask):
    """
    注册所有API蓝图
    
    Args:
        app: Flask应用实例
    """
    # 主路由
    from .main import bp as main_bp
    app.register_blueprint(main_bp, url_prefix='/api')
    
    # 数据管理API
    from .data import bp as data_bp
    app.register_blueprint(data_bp, url_prefix='/api/data')
    
    # 数据清洗API
    from .clean import bp as clean_bp
    app.register_blueprint(clean_bp, url_prefix='/api/clean')
    
    # 数据分析API
    from .analysis import bp as analysis_bp
    app.register_blueprint(analysis_bp, url_prefix='/api/analysis')
    
    # 可视化API
    from .viz import bp as viz_bp
    app.register_blueprint(viz_bp, url_prefix='/api/viz') 

    # 导出API
    from app.api.export import bp as export_bp
    app.register_blueprint(export_bp)